Optimal. Leaf size=94 \[ \frac {b^2}{4 x^2}-\frac {1}{2} a b c^2 \sec ^{-1}(c x)-\frac {1}{4} b^2 c^2 \sec ^{-1}(c x)^2+\frac {b c \sqrt {1-\frac {1}{c^2 x^2}} \left (a+b \sec ^{-1}(c x)\right )}{2 x}+\frac {1}{2} \left (c^2-\frac {1}{x^2}\right ) \left (a+b \sec ^{-1}(c x)\right )^2 \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 94, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {5330, 4489,
3391} \begin {gather*} \frac {b c \sqrt {1-\frac {1}{c^2 x^2}} \left (a+b \sec ^{-1}(c x)\right )}{2 x}+\frac {1}{2} \left (c^2-\frac {1}{x^2}\right ) \left (a+b \sec ^{-1}(c x)\right )^2-\frac {1}{2} a b c^2 \sec ^{-1}(c x)-\frac {1}{4} b^2 c^2 \sec ^{-1}(c x)^2+\frac {b^2}{4 x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3391
Rule 4489
Rule 5330
Rubi steps
\begin {align*} \int \frac {\left (a+b \sec ^{-1}(c x)\right )^2}{x^3} \, dx &=c^2 \text {Subst}\left (\int (a+b x)^2 \cos (x) \sin (x) \, dx,x,\sec ^{-1}(c x)\right )\\ &=\frac {1}{2} \left (c^2-\frac {1}{x^2}\right ) \left (a+b \sec ^{-1}(c x)\right )^2-\left (b c^2\right ) \text {Subst}\left (\int (a+b x) \sin ^2(x) \, dx,x,\sec ^{-1}(c x)\right )\\ &=\frac {b^2}{4 x^2}+\frac {b c \sqrt {1-\frac {1}{c^2 x^2}} \left (a+b \sec ^{-1}(c x)\right )}{2 x}+\frac {1}{2} \left (c^2-\frac {1}{x^2}\right ) \left (a+b \sec ^{-1}(c x)\right )^2-\frac {1}{2} \left (b c^2\right ) \text {Subst}\left (\int (a+b x) \, dx,x,\sec ^{-1}(c x)\right )\\ &=\frac {b^2}{4 x^2}-\frac {1}{2} a b c^2 \sec ^{-1}(c x)-\frac {1}{4} b^2 c^2 \sec ^{-1}(c x)^2+\frac {b c \sqrt {1-\frac {1}{c^2 x^2}} \left (a+b \sec ^{-1}(c x)\right )}{2 x}+\frac {1}{2} \left (c^2-\frac {1}{x^2}\right ) \left (a+b \sec ^{-1}(c x)\right )^2\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 102, normalized size = 1.09 \begin {gather*} \frac {-2 a^2+b^2+2 a b c \sqrt {1-\frac {1}{c^2 x^2}} x+2 b \left (-2 a+b c \sqrt {1-\frac {1}{c^2 x^2}} x\right ) \sec ^{-1}(c x)+b^2 \left (-2+c^2 x^2\right ) \sec ^{-1}(c x)^2-2 a b c^2 x^2 \text {ArcSin}\left (\frac {1}{c x}\right )}{4 x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(192\) vs.
\(2(82)=164\).
time = 0.16, size = 193, normalized size = 2.05
method | result | size |
derivativedivides | \(c^{2} \left (-\frac {a^{2}}{2 c^{2} x^{2}}+b^{2} \left (-\frac {\mathrm {arcsec}\left (c x \right )^{2}}{2 c^{2} x^{2}}+\frac {\mathrm {arcsec}\left (c x \right ) \left (\mathrm {arcsec}\left (c x \right ) c x +\sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\right )}{2 c x}-\frac {\mathrm {arcsec}\left (c x \right )^{2}}{4}-\frac {1}{4}+\frac {1}{4 c^{2} x^{2}}\right )-\frac {a b \,\mathrm {arcsec}\left (c x \right )}{c^{2} x^{2}}-\frac {a b \sqrt {c^{2} x^{2}-1}\, \arctan \left (\frac {1}{\sqrt {c^{2} x^{2}-1}}\right )}{2 \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c x}+\frac {a b \left (c^{2} x^{2}-1\right )}{2 \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c^{3} x^{3}}\right )\) | \(193\) |
default | \(c^{2} \left (-\frac {a^{2}}{2 c^{2} x^{2}}+b^{2} \left (-\frac {\mathrm {arcsec}\left (c x \right )^{2}}{2 c^{2} x^{2}}+\frac {\mathrm {arcsec}\left (c x \right ) \left (\mathrm {arcsec}\left (c x \right ) c x +\sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\right )}{2 c x}-\frac {\mathrm {arcsec}\left (c x \right )^{2}}{4}-\frac {1}{4}+\frac {1}{4 c^{2} x^{2}}\right )-\frac {a b \,\mathrm {arcsec}\left (c x \right )}{c^{2} x^{2}}-\frac {a b \sqrt {c^{2} x^{2}-1}\, \arctan \left (\frac {1}{\sqrt {c^{2} x^{2}-1}}\right )}{2 \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c x}+\frac {a b \left (c^{2} x^{2}-1\right )}{2 \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c^{3} x^{3}}\right )\) | \(193\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.49, size = 82, normalized size = 0.87 \begin {gather*} \frac {{\left (b^{2} c^{2} x^{2} - 2 \, b^{2}\right )} \operatorname {arcsec}\left (c x\right )^{2} - 2 \, a^{2} + b^{2} + 2 \, {\left (a b c^{2} x^{2} - 2 \, a b\right )} \operatorname {arcsec}\left (c x\right ) + 2 \, \sqrt {c^{2} x^{2} - 1} {\left (b^{2} \operatorname {arcsec}\left (c x\right ) + a b\right )}}{4 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \operatorname {asec}{\left (c x \right )}\right )^{2}}{x^{3}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 147, normalized size = 1.56 \begin {gather*} \frac {1}{8} \, {\left (2 \, b^{2} c \arccos \left (\frac {1}{c x}\right )^{2} + 4 \, a b c \arccos \left (\frac {1}{c x}\right ) - b^{2} c + \frac {4 \, b^{2} \sqrt {-\frac {1}{c^{2} x^{2}} + 1} \arccos \left (\frac {1}{c x}\right )}{x} + \frac {4 \, a b \sqrt {-\frac {1}{c^{2} x^{2}} + 1}}{x} - \frac {4 \, b^{2} \arccos \left (\frac {1}{c x}\right )^{2}}{c x^{2}} - \frac {8 \, a b \arccos \left (\frac {1}{c x}\right )}{c x^{2}} - \frac {4 \, a^{2}}{c x^{2}} + \frac {2 \, b^{2}}{c x^{2}}\right )} c \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+b\,\mathrm {acos}\left (\frac {1}{c\,x}\right )\right )}^2}{x^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________